#include <stdio.h>
#include <stdlib.h>
int main()
{
    int a,b,c,d,f,score;
    a=b=c=d=f=0;
    scanf("%d",&score);
    //start
    while(score != -1)
    {
    	if(score >= 90)
    		a++;
    	else if(score<90 && score>=80)
    		b++;
    	else if(score<80 && score>=70)
    		c++;
    	else if(score<70 && score>=60)
    		d++;
    	else
    		f++;
    	scanf("%d", &score);
	}
    //end
    printf("A: %d\nB: %d\nC: %d\nD: %d\nF: %d\n",a,b,c,d,f);
    return 0;
}
